<?php

namespace app\validate;

use think\Validate;

class CityValidate extends Validate
{
    protected $rule = [
        'id|id'       =>  'require|max:11',
        'city|中文'       =>  'require|max:20',
        'city_name|英文'     => 'require|max:50',
        'province|省'     => 'require|max:50',
    ];

    protected $scene = [
        'add' => ['city', 'city_name', 'province'],
        'update' => ['id','city', 'city_name', 'province'],
    ];

}